package com.zxd.threads;

/**
 * ClassName:MyThread
 * Package:com.zxd.threads
 *
 * @Date:2023/9/25 13:43
 * @Author:zxde
 */

/**
 * 方式1，继承Thread实现
 */
public class MyThread extends Thread {
    @Override

    //线程要做的事情
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println("子线程输出   " + i);
        }
    }
}
